﻿using System.Web.Mvc;
using System.Web.Routing;

namespace SoBusiness
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.RouteExistingFiles = true;
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");  //忽略资源文件
            routes.IgnoreRoute("{htmlPage}.html/{*pathInfo}"); //忽略静态.html页面文件


            routes.MapRoute(
                name: "Login",
                url: "{controller}/{action}",
                defaults: new {controller="SoBiz",action="Index" }
            );

            //routes.MapRoute(
            //    name: "FnLogin",
            //    url: "{controller}/{action}/{naem,pass}",
            //    defaults: new { controller = "SoBiz", action = "Login" }
            //);

            //routes.MapRoute(
            //    name: "BizTools",
            //    url: "BizTools/{controller}/{action}",
            //    defaults: new { controller = "BizTools", action = "Index" });

            //routes.MapHttpRoute(
            //    name: "DefaultApi",
            //    routeTemplate: "api/{controller}/{id}",
            //    defaults: new { id = RouteParameter.Optional }
            //);

            //routes.MapRoute(
            //    name: "Default",
            //    url: "",
            //    defaults: new { controller = "SoProj", action = "Login", id = UrlParameter.Optional }
            //);
        }
    }
}